import request from '@utils/ajax'

export const login = data => {
  return request({
    auth: false,
    url: 'applet/user/regLogin',
    data,
    method: 'POST'
  })
}

export const getConfig = () => {
  return request({
    auth: false,
    url: 'common/appConfig/appletConfig'
  })
}

export const getSession = code => {
  return request({
    auth: false,
    url: 'applet/config/getSession',
    data: {
      code
    }
  })
}

export const getUserInfo = () => {
  return request({
    url: 'app/v1/user/info',
  })
}
